package lab02.test02;

import com.sun.org.apache.xpath.internal.SourceTree;

import java.util.Scanner;
//
/**
 * Created by Administrator on 2017/10/12.
 */
public class Circle {
    public static void main(String[] args) {
        double PI;
        PI = 3.14;
        float radius;
        System.out.println("请输入圆半径：");
        Scanner sc = new Scanner(System.in);
        radius = sc.nextFloat();
        show(radius, PI);
    }

    static void show(float radius, double PI) {
        double area;
        double perimeter;
        area = PI * radius * radius;
        perimeter = 2 * PI * radius;
        System.out.println("圆的半径是：" + radius);
        System.out.println("圆周率是" + PI);
        System.out.println("面积是" + area);
        System.out.println("周长是" + perimeter);
    }
}

